import { toLoginApi } from "@/services/loginService";

const actionCreatorLogin = (data) => ({ type: "login", data });
export const toLoginAction = (userData) => async (dispatch) => {
  const res = await toLoginApi(userData);
  dispatch(actionCreatorLogin(res.data));
  return res.code;
};

export const setToUrlAction = (url) => ({ type: "setUrl", data: url });
